﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using log4net;
using MongoDB.Bson;

namespace Common
{
    public class LogDBModel
    {
        private ObjectId id;
        private int index;
        private DateTime createTime;
        private string className;
        private string message;
        private string stackTrace;
        private string logType;
        private Exception ex;
        private LocalXMLModel localModel;

        public DateTime CreateTime
        {
            get
            {
                return createTime.ToLocalTime();
            }

            set
            {
                createTime = value;
            }
        }

        public string ClassName
        {
            get
            {
                return className;
            }

            set
            {
                className = value;
            }
        }

        public string Message
        {
            get
            {
                return message;
            }

            set
            {
                message = value;
            }
        }

        public ObjectId _id
        {
            get
            {
                return id;
            }

            set
            {
                id = value;
            }
        }

        public LocalXMLModel LocalModel
        {
            get
            {
                return localModel;
            }

            set
            {
                localModel = value;
            }
        }

        public int Index
        {
            get
            {
                return index;
            }

            set
            {
                index = value;
            }
        }

        public string StackTrace
        {
            get
            {
                return stackTrace;
            }

            set
            {
                stackTrace = value;
            }
        }

        public Exception Ex
        {
            get
            {
                return ex;
            }

            set
            {
                ex = value;
            }
        }

        public string LogType
        {
            get
            {
                return logType;
            }

            set
            {
                logType = value;
            }
        }
    }
}
